package shell.listener;

import javax.swing.JTextField;
import javax.swing.event.CaretEvent;
import javax.swing.event.CaretListener;

import shell.view.windows.VariablesPanel;
/**@author Rafael Rocha*/
public class SelectVarCaretListener implements CaretListener{

	private VariablesPanel panel;
	private JTextField field;
	
	public SelectVarCaretListener(JTextField field, VariablesPanel panel){
		this.panel = panel;
		this.field = field;
	}
	@Override
	public void caretUpdate(CaretEvent e) {
		panel.updateVarListWithText(field.getText());
	}

}
